<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
 <%@ include file="/common/taglibs.jsp" %>
 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>检验检疫管理员页面</title>
<style type="text/css">
</style>
<link href="${ctx }/css/public.css" rel="stylesheet" type="text/css" />
</head>

<body>
  <div class="content clearfix">
    <div class="nav">
      <i class="top_button"></i>
      <ul class="nav_ul" style="margin-top:50px;">
        <li class="nav_li"><a href="${ctx }/admin/newsphoto-admin!list.action" target="mainFrame" hidefocus="true" class="nav_a"><i class="icon_1"></i>图片新闻管理</a></li>
        <li class="nav_li"><a href="${ctx }/admin/announcement-admin!list.action"  class="nav_a" hidefocus="true" target="mainFrame"><i class="icon_2"></i>通知公告管理</a></li>
        <li class="nav_li"><a href="${ctx }/admin/member-admin!list.action?sort=5"  target="mainFrame" hidefocus="true" class="nav_a"><i class="icon_3"></i>会员管理</a></li>
        <li class="nav_li"><a class="nav_a"><i class="icon_4"></i>会员服务</a>
          <ul class="nav_more_ul">
            <li><a href="${ctx }/admin/application-for-member-ship-admin!show.action" hidefocus="true"  target="mainFrame">入会申请</a></li>
            <li><a href="${ctx }/admin/staticmessage-admin!show.action?type=2" hidefocus="true"  target="mainFrame">入会程序</a></li>
            <li><a  href="${ctx }/admin/staticmessage-admin!show.action?type=3" hidefocus="true" target="mainFrame">收费标准</a></li>
          </ul>
        </li>
        <li class="nav_li"><a href="${ctx }/admin/file-upload-admin!list.action" hidefocus="true" class="nav_a" target="mainFrame"><i class="icon_5"></i>资料管理</a></li>
        <li class="nav_li"><a href="${ctx }/admin/trends-admin!list.action"  target="mainFrame" class="nav_a" hidefocus="true" target="mainFrame"><i class="icon_6"></i>分会动态管理</a></li>
        <li class="nav_li"><a href="${ctx }/admin/staticmessage-admin!show.action?type=4"  class="nav_a" hidefocus="true" target="mainFrame"><i class="icon_7"></i>编辑分会概况</a></li>
        <li class="nav_li"><a href="${ctx }/admin/staticmessage-admin!show.action?type=1"  class="nav_a" hidefocus="true" target="mainFrame"><i class="icon_8"></i>编辑联系我们</a></li>
      </ul>
      <i class="bottom_button"></i>
    </div>
  </div>
  <script type="text/javascript" src="${ctx }/js/public.js"></script>
 <script type="text/javascript">
    var nav_li = newdom.getElementsByClass("nav_li"),
        len_nav_li = nav_li.length;
        //alert(len_nav_li)
    for(var i = 0;i < len_nav_li;i++){
      nav_li[i].index = i;
      nav_li[i].onclick = function(e){
        var _e = window.event ? window.event : _e || arguments[0],
            _target = _e.target ? _e.target : _e.srcElement;
        for(var j = 0;j < len_nav_li;j++){
          if(this.index == j){
            nav_li[j].className = "nav_li current_ps";
            var ul = nav_li[j].getElementsByTagName("ul")[0];
            if(ul && ul.style.display != "block"){
              ul.style.display = "block";
            }
            else{
              if(ul && _target.className == "nav_a"){
                ul.style.display = "none";
              }
            }
          }
          else{
            nav_li[j].className = "nav_li";
          }
        }
      }
    }
  </script>
  <script type="text/javascript">
    //获取节点
    var body = document.getElementsByTagName("body")[0],
        nav = newdom.getElementsByClass("nav")[0],
        nav_ul = newdom.getElementsByClass("nav_ul")[0],
        top_button = newdom.getElementsByClass("top_button")[0],
        bottom_button = newdom.getElementsByClass("bottom_button")[0];
    nav.style.height = body.clientHeight;

    var temp_top = true,
        temp_bottom = true;
    
    //点击向上拉动按钮，导航栏向上滚动
    top_button.onclick = function(){
      if(temp_top){
        var margin_scroll = nav_ul.offsetHeight - body.clientHeight + 50;
        var margin_current = -parseFloat(newdom.GetCurrentStyle(nav_ul,"margin-top")) || -parseFloat(nav_ul.style.marginTop);
        nav_ul.style.marginTop = newdom.GetCurrentStyle(nav_ul,"margin-top");
        if(margin_scroll > margin_current){
          var i = 0;
          function circle(){
            if(i < 50){
              temp_top = false;
              setTimeout(function(){
                nav_ul.style.marginTop = parseFloat(nav_ul.style.marginTop) - 1 + "px";
                i++;
                circle();
              },1)
            }
            else{
              temp_top = true;
            }
          }
          circle();
        }
      }
        
    }
    //点击向下拉动按钮，导航栏向下滚动
    bottom_button.onclick = function(){
      if(temp_bottom){
        var margin_current = parseFloat(newdom.GetCurrentStyle(nav_ul,"margin-top")) || parseFloat(nav_ul.style.marginTop);
        //nav_ul.style.marginTop = newdom.GetCurrentStyle(nav_ul,"margin-top");
        if(margin_current < 50){
          var i = 0;
          function circle(){
            if(i < 50){
              temp_bottom = false;
              setTimeout(function(){
                nav_ul.style.marginTop = parseFloat(nav_ul.style.marginTop) + 1 + "px";
                i++;
                circle();
              },1)
            }
            else{
              temp_bottom = true;
            }
          }
          circle();
        }
      }
        
    }

    //会员管理的选择背景图片
    var a = newdom.getElementsByClass("nav_more_ul")[0].getElementsByTagName("a"),
        a_len = a.length;
    for(var i = 0;i < a_len;i++){
      a[i].index = i;
      a[i].onclick = function(){
        for(var j = 0;j < a_len;j++)
          if(this.index == j){
            a[j].className = "current_choice"
          }
          else{
            a[j].className = ""
          }
        
      }
    }


    //为ie7,ie8重新获取高度，固定向下滚动的按钮
    var isIE = (document.all) ? true : false;
    var isIE7 = isIE && (navigator.userAgent.indexOf('MSIE 7.0') != -1); 
    var isIE8 = isIE && (navigator.userAgent.indexOf('MSIE 8.0') != -1); 

    if(isIE8 || isIE7){
      bottom_button.style.top = body.clientHeight - 30;
    }
    //改变窗口，重新获取导航栏的可视高度
    window.onresize = function(){
      nav.style.height = body.clientHeight;
      if(isIE8 || isIE7){
      bottom_button.style.top = body.clientHeight - 30;
      }
    } 
  </script>
    
</body>
</html>